<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left">
							<button shiro:hasPermission="biz:software:add" type="button" class="btn  btn-primary" onclick="mail()">
								<i class="fa fa-address-book" aria-hidden="true"></i>邮寄
							</button>
							<button shiro:hasPermission="biz:software:exports" type="button" class="btn  btn-primary"
									onclick="exports()">
								<i class="fa fa-mail-forward" aria-hidden="true"></i>导出
							</button>
						</div>
						<div class="columns pull-left">
							<label></label>
						</div>

						<div class="columns pull-left col-md-2 nopadding">
							<input id="sn" name="sn" type="text" style="width:100%;" class="form-control" maxlength="15"
								    oninput="approval()" placeholder="扫码出证"
								   autocomplete="off"
							style="width:150px">
							<div id="output" ></div>
						</div>
						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="input-group date columns pull-left col-md-1 nopadding"  id='date0'>
							<input id="startDate" name="startDate" placeholder="开始时间" style="width:100%;" type="text"
								   class="form-control">
							<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar"></i>
										</span>
						</div>
						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="input-group date columns pull-left col-md-1 nopadding"  id='date2'>
							<input id="endDate" name="endDate" placeholder="结束时间" style="width:100%;"
								   type="text" class="form-control">
							<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar"></i>
										</span>
						</div>
						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="columns pull-left col-md-1 nopadding">
							<input id="agentCompany" name="agentCompany" type="text" style="width:100%;" class="form-control"  onchange="reLoad()"
								   placeholder="代理公司" style="width:120px">
						</div>
						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="columns pull-left col-md-1 nopadding">
							<input id="copyrightOwner" name="copyrightOwner" type="text" style="width:100%;" class="form-control"  onchange="reLoad()"
								   placeholder="所有权人" style="width:120px">
						</div>
						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="columns pull-left col-md-1 nopadding">
							<input id="softwareName" name="softwareName" type="text" style="width:100%;" class="form-control"  onchange="reLoad()"
								   placeholder="软著名称" style="width:120px">
						</div>

						<div class="columns pull-left" style="width:5px">
							<label></label>
						</div>
						<div class="input-group date columns pull-left col-md-1 nopadding"  id='date1'>
							<input id="approvalTime" name="approvalTime" placeholder="出证日期" style="width:100%;" type="text" class="form-control">
							<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar"></i>
										</span>
						</div>

					</div>
					<table id="exampleTable" data-mobile-responsive="true" style="table-layout: fixed;word-break:break-all; word-wrap:break-all;">
					</table>
				</div>
			</div>
		</div>
	</div>
	<!--shiro控制bootstraptable行内按钮看见性 -->
		<div>
			<script type="text/javascript">
				var s_edit_h = 'hidden';
				var s_remove_h = 'hidden';
				var s_resetPwd_h = 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="biz:software:edit">
			<script type="text/javascript">
				s_edit_h = '';
			</script>
		</div>
		<div shiro:hasPermission="biz:software:remove">
			<script type="text/javascript">
				var s_remove_h = '';
			</script>
		</div>
		<div shiro:hasPermission="biz:software:resetPwd">
			<script type="text/javascript">
				var s_resetPwd_h = '';
			</script>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script type="text/javascript" src="/js/appjs/biz/approval/approval.js"></script>
	<script src="/js/layui.js"></script>
	<script type="text/javascript">


		// Firefox, Google Chrome, Opera, Safari, Internet Explorer from version 9
		function OnInput (event) {
			var text = event.target.value;
			text=text.trim();
			if(text.length==15){
				console.log(" input sn is:"+text);
				approval();
			}
		}
		// Internet Explorer
		function OnPropChanged (event) {
			if (event.propertyName.toLowerCase () == "value") {
				var text = event.srcElement.value;
				text=text.trim();
				if(text.length==15){
					console.log(" input sn is :"+text);
					approval();
				}
			}
		}

		function change() {
			var text= $("#sn").val();
			text=text.trim();
			approval();

		}
	</script>
	<script>
		$(function () {
			$('#date0').datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-cn'),

			}).on('focusout',function chDate() {
				reLoad();

			})
		});
		$(function () {
			$('#date1').datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-cn'),

			}).on('focusout',function chDate() {
				reLoad();

			})
		});
		$(function () {
			$('#date2').datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-cn'),

			}).on('focusout',function chDate() {
				reLoad();

			})
		});
	</script>
</body>
</html>
